package com.companion.companion.service.impl;

import java.util.List;

import com.companion.companion.domain.Serverorder;
import com.companion.companion.mapper.ServerorderMapper;
import com.companion.companion.service.IServerorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 陪护服务订单Service业务层处理
 * 
 * @author zly
 * @date 2025-05-06
 */
@Service
public class ServerorderServiceImpl implements IServerorderService
{
    @Autowired
    private ServerorderMapper serverorderMapper;

    /**
     * 查询陪护服务订单
     * 
     * @param orderId 陪护服务订单主键
     * @return 陪护服务订单
     */
    @Override
    public Serverorder selectServerorderByOrderId(Long orderId)
    {
        return serverorderMapper.selectServerorderByOrderId(orderId);
    }

    /**
     * 查询陪护服务订单列表
     * 
     * @param serverorder 陪护服务订单
     * @return 陪护服务订单
     */
    @Override
    public List<Serverorder> selectServerorderList(Serverorder serverorder)
    {
        return serverorderMapper.selectServerorderList(serverorder);
    }

    /**
     * 新增陪护服务订单
     * 
     * @param serverorder 陪护服务订单
     * @return 结果
     */
    @Override
    public int insertServerorder(Serverorder serverorder)
    {
        System.out.println("serverorder is ");
        System.out.println(serverorder);
        return serverorderMapper.insertServerorder(serverorder);
    }

    /**
     * 修改陪护服务订单
     * 
     * @param serverorder 陪护服务订单
     * @return 结果
     */
    @Override
    public int updateServerorder(Serverorder serverorder)
    {
        return serverorderMapper.updateServerorder(serverorder);
    }

    /**
     * 批量删除陪护服务订单
     * 
     * @param orderIds 需要删除的陪护服务订单主键
     * @return 结果
     */
    @Override
    public int deleteServerorderByOrderIds(Long[] orderIds)
    {
        return serverorderMapper.deleteServerorderByOrderIds(orderIds);
    }

    /**
     * 删除陪护服务订单信息
     * 
     * @param orderId 陪护服务订单主键
     * @return 结果
     */
    @Override
    public int deleteServerorderByOrderId(Long orderId)
    {
        return serverorderMapper.deleteServerorderByOrderId(orderId);
    }
}
